package com.jackstraw.jack_base.datasource.mybatis.service.impl;

import com.jackstraw.jack_base.datasource.common.aspect.annotation.DataSourceNameCut;
import com.jackstraw.jack_base.datasource.common.entity.enums.DataSourceTypeEnum;
import com.jackstraw.jack_base.datasource.mybatis.base.service.impl.MyBatisServiceImpl;
import com.jackstraw.jack_base.datasource.mybatis.dao.database.AaaaDao;
import com.jackstraw.jack_base.datasource.mybatis.entity.bo.AaaaBo;
import com.jackstraw.jack_base.datasource.mybatis.entity.po.AaaaKeyPo;
import com.jackstraw.jack_base.datasource.mybatis.entity.po.AaaaPo;
import com.jackstraw.jack_base.datasource.mybatis.entity.po.AaaaPoExample;
import com.jackstraw.jack_base.datasource.mybatis.service.AaaaService;
import lombok.extern.slf4j.Slf4j;

import java.util.Map;

/**
 * @author jack 945514650@qq.com
 * @since version:1.0 generatorDate:2022-05-13 22:35:17
 */
@Slf4j
@DataSourceNameCut(dataSourceName = "dataBaseName1", dataSourceTypeEnum = DataSourceTypeEnum.database)
public class AaaaServiceImpl
        extends MyBatisServiceImpl<AaaaDao, AaaaPo, AaaaBo, AaaaKeyPo<AaaaPo>, AaaaPoExample>
        implements AaaaService {


    @Override
    protected AaaaPoExample pe(Map<String, Object> params) {
        AaaaPoExample pe = super.pe(params);
        //默认查询主键
        pe.addKey(params);
        return pe;
    }

}
